package com.sfang.common.base.enums;

/**
 * Created by psalmody on 2016/8/22.
 */
public enum OauthStatus {
    JWTDecodeException("40007", "JWTDecodeException"),
    JwtTokenInvalidClaim("40008", "JwtTokenInvalidClaim"),
    JwtTokenExistless("40009", "Token不存在，需要用户登录"),
    InvalidToken("40010", "accessToken无效，注册用户请重新登录，匿名用户重新初始化"),
    NotAuthentication("50401", "非法的访问"),
    InvalidClient("50402", "invalid_client"),
    InvalidClientSecret("50403", "invalid_client_secret"),
    TokenNotExists("50404", "不存在的token"),
    ToeknExpired("50405", "token过期"),
    FroceLogout("50406", "强制登出"),
    InvalidRefreshToken("50407", "refreshToken无效"),
    RefreshTokenExpired("50408", "refreshToken过期"),

    RefreshTokenError("50409", "refreshToken异常"),
    InvalidUserCredential("50501", "帐号密码错误"),
    UserDisabled("50502", "用户已被禁用"),
    InvokeAccountServiceError("50530", "访问account服务异常"),
    InvokeUserServiceError("50531", "访问user服务异常"),
    DeviceHasBeDisabled("50532", "设备已禁用"),
    ResolveDeviceNoFailed("50538", "解析设备号失败"),
    ParseRequestBodyError("50539", "解析requestBody失败"),

    MethodArgumentNotValidException("50400", "参数非法"),
    WulaApiNotAuthenticationException("50601", "非法的操作"),
    WulaFlowRuleException("50602", "访问次数过于频繁，请稍后再试"),
    Unauthorized("50499", "非法操作"),
    UnkonwnError("50500", "未知错误"),
    TooManyRequests("429", "服务繁忙，请稍后再试"),
    NotFoundException("404", "404"),
    DegradeException("50511", "当前服务已触发熔断规则，请稍后再试"),
    FlowException("50512", "当前服务已触发限流规则，请稍后再试"),
    BlackWithRemark("50515", "当前服务已触发限流规则，请稍后再试"),
    SaasFroceLogout("50516", "当前角色发生变更，请重新登录");

    OauthStatus(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    private String code;
    private String desc;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

}
